#[doc = "Register `TSENSOR_TEMP_INT_STS` reader"]
pub struct R(crate::R<TSENSOR_TEMP_INT_STS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<TSENSOR_TEMP_INT_STS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<TSENSOR_TEMP_INT_STS_SPEC>> for R {
    fn from(reader: crate::R<TSENSOR_TEMP_INT_STS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "TSensor overtemperature interrupt status.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TSENSOR_OVERTEMP_INT_STS_A {
    #[doc = "0: invalid."]
    INVALID = 0,
    #[doc = "1: valid."]
    VALID = 1,
}
impl From<TSENSOR_OVERTEMP_INT_STS_A> for bool {
    #[inline(always)]
    fn from(variant: TSENSOR_OVERTEMP_INT_STS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tsensor_overtemp_int_sts` reader - TSensor overtemperature interrupt status."]
pub struct TSENSOR_OVERTEMP_INT_STS_R(crate::FieldReader<bool, TSENSOR_OVERTEMP_INT_STS_A>);
impl TSENSOR_OVERTEMP_INT_STS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TSENSOR_OVERTEMP_INT_STS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TSENSOR_OVERTEMP_INT_STS_A {
        match self.bits {
            false => TSENSOR_OVERTEMP_INT_STS_A::INVALID,
            true => TSENSOR_OVERTEMP_INT_STS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TSENSOR_OVERTEMP_INT_STS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TSENSOR_OVERTEMP_INT_STS_A::VALID
    }
}
impl core::ops::Deref for TSENSOR_OVERTEMP_INT_STS_R {
    type Target = crate::FieldReader<bool, TSENSOR_OVERTEMP_INT_STS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "TSensor temperature threshold exceeding interrupt status.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TSENSOR_OUT_THRESH_INT_STS_A {
    #[doc = "0: invalid."]
    INVALID = 0,
    #[doc = "1: valid."]
    VALID = 1,
}
impl From<TSENSOR_OUT_THRESH_INT_STS_A> for bool {
    #[inline(always)]
    fn from(variant: TSENSOR_OUT_THRESH_INT_STS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tsensor_out_thresh_int_sts` reader - TSensor temperature threshold exceeding interrupt status."]
pub struct TSENSOR_OUT_THRESH_INT_STS_R(crate::FieldReader<bool, TSENSOR_OUT_THRESH_INT_STS_A>);
impl TSENSOR_OUT_THRESH_INT_STS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TSENSOR_OUT_THRESH_INT_STS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TSENSOR_OUT_THRESH_INT_STS_A {
        match self.bits {
            false => TSENSOR_OUT_THRESH_INT_STS_A::INVALID,
            true => TSENSOR_OUT_THRESH_INT_STS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TSENSOR_OUT_THRESH_INT_STS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TSENSOR_OUT_THRESH_INT_STS_A::VALID
    }
}
impl core::ops::Deref for TSENSOR_OUT_THRESH_INT_STS_R {
    type Target = crate::FieldReader<bool, TSENSOR_OUT_THRESH_INT_STS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "TSensor temperature measurement completion interrupt status.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TSENSOR_DONE_INT_STS_A {
    #[doc = "0: invalid."]
    INVALID = 0,
    #[doc = "1: valid."]
    VALID = 1,
}
impl From<TSENSOR_DONE_INT_STS_A> for bool {
    #[inline(always)]
    fn from(variant: TSENSOR_DONE_INT_STS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tsensor_done_int_sts` reader - TSensor temperature measurement completion interrupt status."]
pub struct TSENSOR_DONE_INT_STS_R(crate::FieldReader<bool, TSENSOR_DONE_INT_STS_A>);
impl TSENSOR_DONE_INT_STS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TSENSOR_DONE_INT_STS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TSENSOR_DONE_INT_STS_A {
        match self.bits {
            false => TSENSOR_DONE_INT_STS_A::INVALID,
            true => TSENSOR_DONE_INT_STS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TSENSOR_DONE_INT_STS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TSENSOR_DONE_INT_STS_A::VALID
    }
}
impl core::ops::Deref for TSENSOR_DONE_INT_STS_R {
    type Target = crate::FieldReader<bool, TSENSOR_DONE_INT_STS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 2 - TSensor overtemperature interrupt status."]
    #[inline(always)]
    pub fn tsensor_overtemp_int_sts(&self) -> TSENSOR_OVERTEMP_INT_STS_R {
        TSENSOR_OVERTEMP_INT_STS_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 1 - TSensor temperature threshold exceeding interrupt status."]
    #[inline(always)]
    pub fn tsensor_out_thresh_int_sts(&self) -> TSENSOR_OUT_THRESH_INT_STS_R {
        TSENSOR_OUT_THRESH_INT_STS_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 0 - TSensor temperature measurement completion interrupt status."]
    #[inline(always)]
    pub fn tsensor_done_int_sts(&self) -> TSENSOR_DONE_INT_STS_R {
        TSENSOR_DONE_INT_STS_R::new((self.bits & 0x01) != 0)
    }
}
#[doc = "TSENSOR_TEMP_INT_STS is the RF TEMP configuration register.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tsensor_temp_int_sts](index.html) module"]
pub struct TSENSOR_TEMP_INT_STS_SPEC;
impl crate::RegisterSpec for TSENSOR_TEMP_INT_STS_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [tsensor_temp_int_sts::R](R) reader structure"]
impl crate::Readable for TSENSOR_TEMP_INT_STS_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets TSENSOR_TEMP_INT_STS to value 0xff"]
impl crate::Resettable for TSENSOR_TEMP_INT_STS_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0xff
    }
}
